@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal">

            <div class="row">
                <!--该DIV 用于展示保存，预览，打印，插入，删除，复原功能键展示-->
                <div style="width: 100%;height: 8%;">
                    <table style="width: 100%;height: 8%;font-weight: bold;" cellspacing="0">
                        <tr>
                            <td style="text-align: center;font-size: 28px;color: #333;height: 50px;">记账凭证</td>
                        </tr>
                    </table>
                </div>
                <!--该DIV 用于展示凭证字，凭证号，顺序号等字段-->
                <div style="width: 100%;height: 8%;margin-top: 10px;">
                    <input type="hidden" id="other"  value=""/><!--判断是否为多核算-->
                    <input type="hidden" id="contacts_dnit"  value=""/><!--往来单位核算-->
                    <input type="hidden" id="department"  value=""/><!--部门核算-->
                    <input type="hidden" id="staff"  value=""/><!--职员核算-->
                    <table style="width: 100%;height: 8%;font-weight: bold;" cellspacing="0">
                        <tr>
                            <td style="width: 10%;">
                                <select id="documentWord" name="documentWord" class="addglm-table-title-one"
                                        style="width: 60%;height: 80%;margin-left: 12%;" onchange="EntryInfoDlg.documentChange(this.value)">
                                    <option value="1">记</option>
                                    <option value="2">收</option>
                                    <option value="3">付</option>
                                    <option value="4">转</option>
                                </select>  字
                            </td>
                            <td style="width: 10%;">
                                <input id="documentNumber"  name="documentNumber" onkeyup="value=value.replace(/[^\d]/g,'')" style="width: 50px;
                                height: 80%;margin-left: 10px;border-radius: 10px;border: 1px #ccc solid;text-indent: 5px;line-height: 22px;"
                                 type="text" maxlength="5" value="${document_number}" /> 号
                            </td>
                            <td style="width: 15%;">
                                <!-- 信息警告消息的上下文按钮 -->
                                <button style="margin-left: 15%;" type="button" class="btn btn-info btn-xs" onclick="EntryInfoDlg.addSubmit()" >保存</button>
                                <button type="button" class="btn btn-info btn-xs">预览</button>
                                <button type="button" class="btn btn-info btn-xs">打印</button>
                            </td>
                            <td style="text-align: center;width: 28%;">
                                日期:&nbsp;&nbsp;<input style="width: 36%;height: 90%;text-align: center;
                                border-radius: 10px;border: 1px #ccc solid" type="text" name="businessDate" id="businessDate" >
                                &nbsp;&nbsp;第<input style="border-width: 0;width: 10%;height: 90%;text-align: center;"
                                  id="period" name="period" readonly="readonly" value="${period}" type="text">期
                            </td>
                            <td style="width: 15%;">
                                <button style="margin-left: 1%" type="button" class="btn btn-info btn-xs" onclick="EntryInfoDlg.stick()">插入</button>
                                <button type="button" class="btn btn-info btn-xs" onclick="EntryInfoDlg.outCell()">删除</button>
                                <button type="button" class="btn btn-info btn-xs" onclick="EntryInfoDlg.balance()" >平衡</button>
                            </td>
                            <td style="width: 12%;">顺序号:<input id="sequenceNumber" class="addglm-table-title-one" name="sequenceNumber"
                                                               onkeyup="value=value.replace(/[^\d]/g,'')" style="width: 50px;height: 80%;
                                                               margin-left: 10px;text-indent: 5px;   " type="text" maxlength="5"
                                                               value="${sequence_number}" />
                            </td>
                            <td style="width: 12%;">单据数:  <input id="documentsNumber" class="addglm-table-title-one" name="documentsNumber"
                                                                 onkeyup="value=value.replace(/[^\d]/g,'')" style="width: 50px;height: 80%;
                                                                 text-indent: 5px;" type="text" maxlength="5" />
                            </td>
                        </tr>
                    </table>
                </div>
                <!--table主要用于会计科目及金额的添加-->
                <table id="subjectTable" class="addglm-table-content-table" style="width: 100%;font-weight: bold;color: black;margin-top: 20px;"
                       cellspacing="0" >
                    <thead style="text-align: center;font-size: 16px;">
                        <tr style="background-color: #f1f2f7;border-radius: 10px;">
                            <th style="text-align:left;height: 40px;width: 40%;padding: 0 5px">
                                <i class="fa fa-th-large" style="color: #0557b2"></i> 会计科目
                            </th>
                            <th style="text-align: left;height: 40px;width: 20%;padding: 0 5px">
                                <i class="fa fa-file" style="color:#0557b2 "></i> 摘要
                            </th>
                            <th style="text-align: left;height: 40px;width: 20%;padding: 0 5px">
                                <i class="fa fa-credit-card" style="color:#0557b2 "></i> 借方金额
                            </th>
                            <th style="text-align: left;height: 40px;width: 20%;padding: 0 5px">
                                <i class="fa fa-institution" style="color:#0557b2"></i> 贷方金额
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr style="border-bottom: 1px #ccc solid">
                            <td onclick="Subject.openAddSubject(this)" style="height: 35px;">
                                <input type="hidden" name="expenseAccount" onblur="EntryInfoDlg.blurVal(this)">
                                <input style="width:100%;height: 40px;border: none;overflow: hidden; resize:none;line-height: 40px;"
                                       placeholder="请选择" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <td style="height: 40px;"><input  maxlength="20" style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                              placeholder="不得多余20字" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <td style="height: 40px;"><input onkeyup="value=value.replace(/[^\d]/g,'.')" maxlength="10"
                                                             style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                             placeholder="0.00" type="text" name="debitAmount" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <td style="height: 40px;"><input onkeyup="value=value.replace(/[^\d]/g,'.')" maxlength="10"
                                                             style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                             placeholder="0.00" type="text" name="creditAmount" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <input type="hidden" name="contactsDnit" value=""/><!--往来单位核算-->
                            <input type="hidden" name="department" value=""/><!--部门核算--><input type="hidden" name="staff" value=""/><!--职员核算-->
                        </tr>
                        <tr style="border-bottom: 1px #ccc solid">
                            <td onclick="Subject.openAddSubject(this)" style="height: 35px;">
                                <input type="hidden" name="expenseAccount" onblur="EntryInfoDlg.blurVal(this)">
                                <textarea style="width:100%;height: 40px;border: none;overflow: hidden; resize:none;line-height: 40px;"
                                          placeholder="请选择" onblur="EntryInfoDlg.blurVal(this)">
                                </textarea>
                            </td>
                            <td style="height: 40px;"><input  maxlength="20" style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                              placeholder="不得多余20字" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <td style="height: 40px;"><input onkeyup="value=value.replace(/[^\d]/g,'.')" maxlength="10"
                                                             style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                             placeholder="0.00" type="text" name="debitAmount" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <td style="height: 40px;"><input onkeyup="value=value.replace(/[^\d]/g,'.')" maxlength="10"
                                                             style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                             placeholder="0.00" type="text" name="creditAmount" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <input type="hidden" name="contactsDnit" value=""/><!--往来单位核算-->
                            <input type="hidden" name="department" value=""/><!--部门核算--><input type="hidden" name="staff" value=""/><!--职员核算-->
                        </tr>
                        <tr style="border-bottom: 1px #ccc solid">
                            <td onclick="Subject.openAddSubject(this)" style="height: 35px;">
                                <input type="hidden" name="expenseAccount" onblur="EntryInfoDlg.blurVal(this)">
                                <textarea style="width:100%;height: 40px;border: none;overflow: hidden; resize:none;line-height: 40px;"
                                          placeholder="请选择" onblur="EntryInfoDlg.blurVal(this)">
                                </textarea>
                            </td>
                            <td style="height: 40px;"><input  maxlength="20" style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                              placeholder="不得多余20字" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <td style="height: 40px;"><input onkeyup="value=value.replace(/[^\d]/g,'.')" maxlength="10"
                                                             style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                             placeholder="0.00" type="text" name="debitAmount" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <td style="height: 40px;"><input onkeyup="value=value.replace(/[^\d]/g,'.')" maxlength="10"
                                                             style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                             placeholder="0.00" type="text" name="creditAmount" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <input type="hidden" name="contactsDnit" value=""/><!--往来单位核算-->
                            <input type="hidden" name="department" value=""/><!--部门核算--><input type="hidden" name="staff" value=""/><!--职员核算-->
                        </tr>
                        <tr style="border-bottom: 1px #ccc solid">
                            <td onclick="Subject.openAddSubject(this)" style="height: 35px;">
                                <input type="hidden" name="expenseAccount" onblur="EntryInfoDlg.blurVal(this)">
                                <textarea style="width:100%;height: 40px;border: none;overflow: hidden; resize:none;line-height: 40px;"
                                          placeholder="请选择" onblur="EntryInfoDlg.blurVal(this)">
                                </textarea>
                            </td>
                            <td style="height: 40px;"><input  maxlength="20" style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                              placeholder="不得多余20字"  onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <td style="height: 40px;"><input onkeyup="value=value.replace(/[^\d]/g,'.')" maxlength="10"
                                                             style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                             placeholder="0.00" type="text" name="debitAmount" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <td style="height: 40px;"><input onkeyup="value=value.replace(/[^\d]/g,'.')" maxlength="10"
                                                             style="width:100%;height:45px;border: 0px;padding: 0 5px;"
                                                             placeholder="0.00" type="text" name="creditAmount" onblur="EntryInfoDlg.blurVal(this)"/>
                            </td>
                            <input type="hidden" name="contactsDnit" value=""/><!--往来单位核算-->
                            <input type="hidden" name="department" value=""/><!--部门核算--><input type="hidden" name="staff" value=""/><!--职员核算-->
                        </tr>
                    </tbody>
                </table>
                <!--该DIV总金额数 制单人 等-->
                <div style="width: 100%;height: 8%;margin-top: 10px;">
                    <table style="width: 100%;height: 8%;font-weight: bold;border-top: none;"  cellspacing="0">
                        <tr style="background-color: white">
                            <td style="width: 6%;text-align: center">合计：</td>
                            <td style="height: 50px;width: 45%;">
                                <input readonly="readonly" style="width:100%;height:40px;border: 0px;
                                background-color:#f1f2f7;text-indent: 10px;" type="text" id="lumpSum" name="lumpSum"/>
                            </td>
                            <td style="height: 50px;width: 18%;">
                                <input readonly="readonly" style="width:100%;height:40px;border: 0px;
                                background-color:#f1f2f7;border-right: 4px white solid;border-left: 4px white solid;text-indent: 10px;"
                                type="text" name="debitAmountAll" id="debitAmountAll"/>
                            </td>
                            <td style="height: 50px;width: 18%;">
                                <input readonly="readonly" style="width:100%;height:40px;border: 0px;
                                background-color:#f1f2f7;text-indent: 10px;" type="text" name="creditAmountAll" id="creditAmountAll"/>
                            </td>
                        </tr>
                        <tr style="margin-top: 10px;">
                            <td style="width: 6%;text-align: center">
                               备注：
                            </td>
                            <td  colspan="3"  style="height: 40px;">
                                <textarea style="width:100%;height: 100%;border: none;resize:none;
                                padding: 0;background-color: #f1f2f7;padding-top: 5px;text-indent: .8em" id="remarks" name="remarks">
                                </textarea>
                            </td>
                        </tr>
                    </table>
                    <table style="width: 100%;height: 10%;font-weight: bold;margin-top: 20px;" cellspacing="0">
                        <tr>
                            <td><span style="color: black;size: 25px;margin-left: 5%;">审核:</span>
                                <input readonly="readonly" style="width:100%;height:100%;border: 0px;" type="text"
                                       id="approvalPeople" name="approvalPeople"/></td>
                            <td><span style="color: black;size: 25px;margin-left: 10%;">过账:</span>
                                <input readonly="readonly" style="width:100%;height:100%;border: 0px;" type="text"
                                       id="postingStatus" name="postingStatus"/></td>
                            <td><span style="color: black;size: 25px;margin-left: 10%;">制单:</span>
                                <input readonly="readonly" style="width:100%;height:100%;border: 0px;color: black"
                                       type="text" id="preparedBy" name="preparedBy" value="${shiro.getUser().name}"/>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>

    </div>
</div>
<script src="${ctxPath}/static/modular/finance/entry/entryAdd.js"></script>
<script src="${ctxPath}/static/modular/finance/entry/entryAdd_info.js"></script>
<script src="${ctxPath}/static/modular/finance/ExpenseAccount/subject.js"></script>
<script src="${ctxPath}/static/modular/finance/common/ztree_object.js"></script>
<script src="${ctxPath}/static/modular/finance/entry/other_accounting.js"></script>
<script>
    laydate.render({
        elem: '#businessDate',
        type: 'date'
    });
</script>
@}
